﻿namespace Whut.ObjectSharePointMapper
{
    using System;
    using System.Collections.Generic;

    public interface ISession
    {
        TEntity Find<TEntity>(int id);

        IEnumerable<TEntity> FindAll<TEntity>();

        TEntity Insert<TEntity>(TEntity entity);

        void Update<TEntity>(TEntity entity);

        void Delete<TEntity>(TEntity entity);

        // void Delete<TEntity>(int id);

        IQuery<TEntity> CreateQuery<TEntity>();

        User FindUser(int id);

        User FindUser(string loginName);
    }
}
